<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-point-edit" th:object="${point}">
            <input id="id" name="id" th:field="*{id}"  type="hidden">
			<div class="form-group" hidden="hidden" >
				<label class="col-sm-3 control-label">直购电用户ID：</label>
				<div class="col-sm-8">
					<input id="userId" name="userId" th:field="*{userId}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">用户户号：</label>
				<div class="col-sm-8">
					<select id="userNum" name="userNum" class="form-control m-b">
						<option th:each="n : ${num}" th:text="${n}" th:value="${n}" th:field="*{userNum}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">计量点名称：</label>
				<div class="col-sm-8">
					<input id="name" name="name" th:field="*{name}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">计量点代码：</label>
				<div class="col-sm-8">
					<input id="code" name="code" th:field="*{code}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">计量电压等级：</label>
				<div class="col-sm-8">
					<select id="voltageGrade" class="form-control m-b" name="voltageGrade"  th:with="type=${@dict.getType('voltage_grade')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{voltageGrade}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">目录电价明细类别：</label>
				<div class="col-sm-8">
					<select id="priceDetailType" name="priceDetailType" class="form-control m-b"   th:with="type=${@dict.getType('price_detail_type')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{priceDetailType}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">基础电价计费方式：</label>
				<div class="col-sm-8">
					<select id="basicsPriceType" name="basicsPriceType"   class="form-control m-b"   th:with="type=${@dict.getType('basics_price_type')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{basicsPriceType}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">计量点类型：</label>
				<div class="col-sm-8">
					<select id="pointType" name="pointType"  class="form-control m-b"   th:with="type=${@dict.getType('point_type')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{pointType}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">产权归属：</label>
				<div class="col-sm-8">
					<input id="ascription" name="ascription" th:field="*{ascription}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">产权分界点：</label>
				<div class="col-sm-8">
					<input id="ascriptionCutoff" name="ascriptionCutoff" th:field="*{ascriptionCutoff}" class="form-control" type="text">
				</div>
			</div>
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "basics/point"
		$("#form-point-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			}
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-point-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
